package org.ytor.core.sqlflow.dsl.template.node.support;

import org.ytor.core.sqlflow.dsl.template.node.TemplateNode;

/**
 * created by yangtong on 2025/8/7 12:00:24
 * <br/>
 * for 节点
 */
public class ForNode implements TemplateNode {
    /**
     * 要循环的变量，如果是数组，则直接遍历数组，如果是字符串，则以逗号分割产生数组后再遍历数组
     */
    public final String listVar;
    public final BlockNode body;

    public ForNode(String listVar, BlockNode body) {
        this.listVar = listVar;
        this.body = body;
    }

    @Override
    public String toString() {
        return "ForNode(listVar=" + listVar + ")";
    }
}